package com.evil.common.log.util;

import com.evil.common.redis.util.RedisKeyUtil;
import com.evil.common.log.constant.LogRedisConstant;

/**
 * @author liyang
 * @date 2022-08-08 00:00
 */
public class LogRedisKeyUtil extends RedisKeyUtil {

    /**
     * 请求日志id
     *
     * @return String
     */
    public static String requestUuidRequestLogId() {
        String requestUuid = RedisKeyUtil.requestUuid();
        return RedisKeyUtil.requestUuidKey(requestUuid) + ":" + LogRedisConstant.LOG_ID_PREFIX;
    }

    /**
     * 日志详情列表
     */
    public static String logKey(Long requestLogId) {
        return LogRedisConstant.CODE_NAME_PREFIX + LogRedisConstant.LOG_ID_PREFIX + requestLogId;
    }
}
